<template>
	<view class="emojis" :style="{height:height + 'px'}">
		<view class="emojis-line" v-for="line,i in emoji" :key='i'>
			<view class="emojis-item"  v-for="item,index in line" :key='index' @tap='clickEmoji(item)'>
				{{ item }}
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				emoji:[
					["😀","😁","😂","🤣","🤣","😄","😅"],
					["😀","😁","😂","🤣","🤣","😄","😆"],
					["😀","😁","😂","🤣","🤣","😅","😆"],
					["😀","😁","😂","🤣","🤣","😄","😅"],
					["😀","😁","😂","🤣","🤣","😄","😆"],
					["😀","😁","😂","🤣","🤣","😅","😆"],
					["😀","😁","😂","🤣","😄","😅","😆"],
					["😀","😁","😂","🤣","😄","😅","😆"],
					["😀","😁","🤣","🤣","😄","😅","😆"],
					["😀","😂","🤣","🤣","😄","😅","😆"],
					["😁","😂","🤣","🤣","😄","😅","😆"],
					["😀","😁","😂","🤣","🤣","😄","😅"]
				]
			}
		},
		props:{
			height:{
				type:Number,
				default:260
			}
		},
		methods: {
			clickEmoji(e){
				this.$emit('emojis',e)
			}
		}
	}
</script>

<style lang="less">
	.emojis{
		width: 100%;
		// height: 460rpx;
		padding: 16rpx 10rpx 200rpx 10rpx;
		box-sizing: border-box;
		overflow: hidden;
		overflow-y: auto;
		.emojis-line{
			display: flex;
			
			.emojis-item{
				flex: 1;
				text-align: center;
				font-size: 52rpx;
				height: 88rpx;
			}
		}
	}
</style>
